﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="../../css/table.css"
          type="text/css"></link>
    <script type="text/javascript"
            src="../../javascript/comm/comm.js">
    </script>
    <script type="text/javascript" src="../../javascript/jquery-1.7.2.js"></script>
    <script src="~/js/jquery-3.4.1.js"></script>
    <script src="~/js/jquery.validate.js"></script>
    <script src="~/js/jquery.validate.unobtrusive.js"></script>
    <script src="~/js/jquery.unobtrusive-ajax.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#firstKind").change(function () {
                $.post("/jquery5/test/TestAction!doSecondChange", { "firstId": $("#firstKind").val() }, function (data) {
                    var items = $(data).find("item");
                    var secondKind = $("#secondKind");
                    secondKind.html("<option value=''>请选择</option>");
                    items.each(function (i) {
                        var option = $("<option></option>");
                        option.val($(items[i]).attr("id")).html($(items[i]).attr("value")).appendTo(secondKind);
                    });
                }, "text");
            });
        });

        function change1() {



            var se = document.getElementById("firstKindId");
            document.getElementById("firstKindName").value = se.options[se.selectedIndex].innerHTML;

        }
        function change2() {
            var se = document.getElementById("secondKindId");
            document.getElementById("secondKindName").value = se.options[se.selectedIndex].innerHTML;

        }
    </script>
    <script type="text/javascript">

        $(function () {
            var first = $("#firstKindId");
            var second = $("#secondKindId");
            first.change(function () {
                $.post('/HR_Fist/transfer/transferAction!findtwo.action', { 'configThird.firstKindId': $('#firstKindId option:selected').val() },
                    function (data) {

                        second.css("width", first.width());
                        second.empty();
                        second.append("<option value='0' >-----请选择-----</option>");
                        var items = $(data).find("item");
                        items.each(function (i) {
                            var id = $(items[i]).attr("id");
                            var name = $(items[i]).attr("name");
                            second.append("<option value='" + id + "'>" + name + "</option>");


                        });
                    }, 'xml');
                third.val('0');
            });
        });
    </script>
</head>

@using System.Data
@using Model;
@model config_file_third_kind
<body>
    <form role="form" asp-action="third_kind_register" method="post">
        <table width="100%">
            <tr>
                <td>
                    <font color="black">
                        您正在做的业务是：人力资源--客户化设置--人力资源档案管理设置--III级机构设置--III级机构添加
                    </font>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <input type="submit" value="提交" class="BUTTON_STYLE1">
                    <input type="button" value="返回" class="BUTTON_STYLE1"
                           onclick="history.back();">
                </td>
            </tr>
        </table>
        <table width="100%" border="1" cellpadding=0 cellspacing=1
               bordercolorlight=#848284 bordercolordark=#eeeeee
               class="TABLE_STYLE1">
            <tr>
                <td width="19%" class="TD_STYLE1">
                    I级机构名称
                </td>
                <td width="81%" class="TD_STYLE2">
                    <select asp-for="first_kind_id" class="INPUT_STYLE1">
                        <option value="0">
                            请选择I机构名称
                        </option>
                        @foreach (var item in ViewBag.ss)
                        {
                            <option value=@item.first_kind_id>@item.first_kind_name</option>
                        }
                    </select>
                </td>
            </tr>
            <tr>
                <td width="19%" class="TD_STYLE1">
                    II级机构名称
                </td>
                <td width="81%" class="TD_STYLE2">
                    <select asp-for="second_kind_id" class="INPUT_STYLE1">
                        <option value="0">
                            请选择II机构名称
                        </option>
                        @foreach (var item in ViewBag.dt)
                        {
                            <option value=@item.second_kind_id>@item.second_kind_name</option>
                        }
                    </select>
                </td>
            </tr>
            <tr>
                <td width="19%" class="TD_STYLE1">
                    III级机构编号
                </td>
                <td width="81%" class="TD_STYLE2">
                    <input type="text" class="form-control" asp-for="third_kind_id">
                </td>
            </tr>
            <tr>
                <td class="TD_STYLE1">
                    III级机构名称
                </td>
                <td class="TD_STYLE2">
                    <input type="text" class="form-control" asp-for="third_kind_name">
                    @*<input type="text" class="INPUT_STYLE1" name="cftk.thirdKindName" />*@
                </td>
            </tr>
            <tr>
                <td class="TD_STYLE1">
                    销售责任人编号（多个编号之间请用"半角逗号"加"一个空格"隔开，如", "）
                </td>
                <td class="TD_STYLE2">
                    <input type="text" class="form-control" asp-for="third_kind_sale_id" rows="4" cols="120">
                    @*<textarea rows="4" cols="120" class="TEXTAREA_STYLE1" name="cftk.thirdKindSaleId"></textarea>*@
                </td>
            </tr>
            <tr>
                <td class="TD_STYLE1">
                    是否为零售店（是/否）
                </td>
                <td class="TD_STYLE2">
                    <select asp-for="third_kind_is_retail">
                        <option selected="selected">是</option>
                        <option>否</option>
                    </select>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>